package com.chengqs.rainbow.im.gateway.properties;

import com.chengqs.rainbow.common.im.properties.ZookeeperProperties;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * <B>主类名称：</B>ConfigProperties<BR>
 * <B>概要说明：</B>enter<BR>
 *
 * @author: chengqs
 * @create: 2025-09-13 14:35:20
 **/
@ConfigurationProperties(prefix = ConfigProperties.PREFIX)
@Component
@Getter
@Setter
public class ConfigProperties {
    public static final String PREFIX = "im";

    /**
     * 使用协议，ws、tcp
     */
    private String protocol = "ws";

    /**
     * 服务名
     */
    private String name = "im-gateway";

    /**
     * 服务器地址
     */
    private String ipAddress;

    /**
     * 服务端口
     */
    private Integer port;

    /**
     * 最大连接数
     */
    private Integer maxOnlineCount = 300000;

    /**
     * 心跳配置
     */
    private HeartbeatProperties heartbeat = new HeartbeatProperties();

    /**
     * zookeeper配置
     */
    private ZookeeperProperties zk = new ZookeeperProperties();
}
